/*
  author Sylvain Bertrand <digital.ragnarok@gmail.com>
  Protected by GNU Affero GPL v3 with some exceptions.
  See README at root of alga tree.
*/
#include <linux/module.h>
#include <linux/slab.h>

#include <alga/alga.h>
#include <alga/timing.h>
int alga_dp_safe_timing(struct alga_timing **ts)
{
	/* init the array, namely one mode and one terminator */
	*ts = kzalloc(sizeof(**ts) * 2, GFP_KERNEL);
	if (*ts == NULL)
		return -ALGA_ERR;

	/* timings from the VESA safe mode standard */
	(*ts)->h = 640;
	(*ts)->h_bl = 160; 
	(*ts)->h_so = 656;
	(*ts)->h_spw = 96;
	(*ts)->h_sp = 1;

	(*ts)->v = 480;
	(*ts)->v_bl = 45; 
	(*ts)->v_so = 490;
	(*ts)->v_spw = 2;
	(*ts)->v_sp = 1;

	(*ts)->pixel_clk = 25175;
	return 0;
}
EXPORT_SYMBOL_GPL(alga_dp_safe_timing);
